package com.red.usespringboot;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;

public class RedApplicationContextInitializer implements ApplicationContextInitializer {


    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        // 可以注册
//        applicationContext.getBeanFactory().registerSingleton("redExcludeFilter",new RedExcludeFilter());

        // springboot 创建了一个上下文对象，但是没有扫描bean

        System.out.println("spring 初始化");
    }
}
